// import Cookies from 'js-cookie'
// token在缓存中的名称
const TokenKey = 'ycloud-operate-access_token'
/**
 * 获取token
 */
export function getToken () {
  return sessionStorage.getItem(TokenKey)
}

/**
 * 设置token
 * @param {String} token [token的值]
 */
export function setToken (token) {
  // return Cookies.set(TokenKey, token)
  localStorage.setItem(TokenKey, token)
  return sessionStorage.setItem(TokenKey, token)
}
/**
 * 清除token
 */
export function removeToken () {
  // return Cookies.remove(TokenKey)
  return sessionStorage.removeItem(TokenKey)
}
